<!--{eval $_TPL['titles'] = array($thread['subject'], $mtag['tagname'], $mtag['title'], '话题');}-->
<!--{template header}-->

<h2 class="title">
	<img src="image/app/mtag.gif"><a href="space.php?do=mtag&id=$mtag[fieldid]">$mtag[title]</a> -
	<a href="space.php?do=mtag&tagid=$mtag[tagid]">$mtag[tagname]</a>
</h2>

<div class="tabs_header">
	<a href="cp.php?ac=share&type=thread&id=$thread[tid]" id="a_share" onclick="ajaxmenu(event, this.id, 99999, '', -1)" class="a_share">分享</a>
	<div class="r_option">
		<!--{if $_SGLOBAL[supe_uid] == $thread[uid] || checkperm('manageblog')}--><a href="cp.php?ac=common&op=manage&idtype=thread&id=$thread[tid]" id="a_manage" onclick="ajaxmenu(event, this.id, 99999)">管理</a><span class="pipe">|</span><!--{/if}-->
		<a href="cp.php?ac=common&op=report&idtype=thread&id=$thread[tid]" id="a_report" onclick="ajaxmenu(event, this.id, 99999,'' , -1)">举报</a><span class="pipe">|</span>
	</div>
	<ul class="tabs">
		<li><a href="space.php?do=mtag&tagid=$thread[tagid]&view=list"><span>返回讨论区</span></a></li>
		<!--{if empty($mtag['ismember']) && $mtag['joinperm'] < 2}-->
		<li class="null"><a href="cp.php?ac=mtag&op=join&tagid=$mtag[tagid]" id="mtag_join_$mtag[tagid]" onclick="ajaxmenu(event, this.id, 99999)">加入该群组</a></li>	
		<!--{elseif $mtag['allowpost']}-->
		<li class="null"><a href="cp.php?ac=thread&tagid=$mtag[tagid]">发起新话题</a></li>
		<!--{/if}-->
	</ul>
</div>

<div id="div_post">
	<div class="board">
		<!--{if $thread[content]}-->
		<div id="post_$thread[content][pid]_li">
			<ul class="line_list">
				<li>
				<table width="100%">
				<tr>
					<td width="70" valign="top">
						<div class="avatar48">
						<a href="space.php?uid=$thread[uid]"><img src="<!--{avatar($thread[uid],small)}-->" alt="{$_SN[$thread[uid]]}" class="avatar" /></a>
						</div>
					</td>
					<td>
						<div class="title">
							<div class="r_option">
								<!--{if $thread[uid]==$_SGLOBAL[supe_uid]}-->
								<a href="cp.php?ac=thread&op=edit&pid=$thread[content][pid]&tagid=$thread[tagid]">编辑</a>
								<!--{/if}-->
								<!--{if $mtag[grade]>=8 || $thread[uid]==$_SGLOBAL[supe_uid]}-->
								<a href="cp.php?ac=thread&op=delete&pid=$thread[content][pid]&tagid=$thread[tagid]" id="p_$thread[content][pid]_delete" onclick="ajaxmenu(event, this.id, 99999)">删除</a>
								<!--{/if}-->
								<!--{if $mtag[allowpost]}--><a href="#postform">回复</a><!--{/if}--> 
								<!--{if $mtag[grade]>=8}-->
									<!--{if $thread[displayorder]}-->
									<a href="cp.php?ac=thread&op=top&tagid=$thread[tagid]&tid=$thread[tid]&cancel" id="t_$thread[tid]_top" onclick="ajaxmenu(event, this.id, 2000)">取消置顶</a>
									<!--{else}-->
									<a href="cp.php?ac=thread&op=top&tagid=$thread[tagid]&tid=$thread[tid]" id="t_$thread[tid]_top" onclick="ajaxmenu(event, this.id, 2000)">置顶</a>
									<!--{/if}-->
									<!--{if $thread[digest]}-->
									<a href="cp.php?ac=thread&op=digest&tagid=$thread[tagid]&tid=$thread[tid]&cancel" id="t_$thread[tid]_digest" onclick="ajaxmenu(event, this.id, 2000)">取消精华</a>
									<!--{else}-->
									<a href="cp.php?ac=thread&op=digest&tagid=$thread[tagid]&tid=$thread[tid]" id="t_$thread[tid]_digest" onclick="ajaxmenu(event, this.id, 2000)">精华</a>
									<!--{/if}-->
								<!--{/if}-->
							</div>
							<h1>$thread[subject]</h1>
							<a href="space.php?uid=$thread[uid]">{$_SN[$thread[uid]]}</a>
							<span class="time"><!--{date('Y-m-d H:i',$thread[dateline],1)}--></span>
						</div>
						<div class="detail" id="detail_0">
							<!--{if $_SGLOBAL['ad']['rightside']}-->
							<div style="float: right; padding:5px;"><!--{ad/rightside}--></div>
							<!--{/if}-->
							$thread[content][message]
							<!--{if $thread[content][pic]}--><div><a href="$thread[content][pic]" target="_blank"><img src="$thread[content][pic]" alt="" class="resizeimg" /></a></div><!--{/if}-->
						</div>
					</td>
				</tr>
				</table>
				</li>
			</ul>
		</div>
		<!--{/if}-->

		<div id="post_ul">
		
			<!--{if $pid}-->
			<div class="notice">
				当前只显示与你操作相关的单个帖子，<a href="space.php?uid=$thread[uid]&do=thread&id=$thread[tid]">点击此处查看全部回帖</a>
			</div>
			<!--{/if}-->

			<!--{loop $list $value}-->
			<!--{template space_post_li}-->
			<!--{/loop}-->
		</div>
		
		<div class="page">$multi</div>
		
		<!--{if $mtag[allowpost]}-->
		
		<div class="quickpost" id="postform">
			<form method="post" action="cp.php?ac=thread" class="quickpost" id="quickpostform_{$thread[tid]}" name="quickpostform_{$thread[tid]}">
				<table>
					<tr>
						<td>
							<a href="###" id="quickpost" onclick="showFace(this.id, 'message');"><img src="image/facelist.gif" align="absmiddle" /></a><br>
							<textarea id="message" name="message" onkeydown="ctrlEnter(event, 'postsubmit_btn');" col="50" rows="6" style="width: 450px; height: 6em;"></textarea>
						</td>
					</tr>
					<tr>
						<td>插入图片</td>
					</tr>
					<tbody id="quickpostimg">
						<tr>
							<td>
								<input type="text" name="pics[]" onfocus="if(this.value == 'http://')this.value='';" onblur="if(this.value=='')this.value='http://'" value="http://" class="t_input" size="55" />&nbsp;
								<a href="javascript:;" onclick="insertWebImg(this.previousSibling.previousSibling)">插入</a> &nbsp;
								<a href="javascript:;" onclick="delRow(this, 'quickpostimg')">删除</a>
							</td>
						</tr>
					</tbody>
					<tr>
						<td><a href="javascript:;" onclick="copyRow('quickpostimg')">+增加图片</a> <span class="gray">只支持 .jpg、.gif、.png为结尾的URL地址</span></td>
					</tr>
					<tr>
						<td>
							<input type="hidden" name="tid" value="$thread[tid]" />
							<input type="hidden" name="postsubmit" value="true" />
							<input type="button" id="postsubmit_btn" name="postsubmit_btn" value="回复" class="submit" onclick="ajaxpost('quickpostform_{$thread[tid]}', 'post_status', 'post_add')" />
							<div id="post_status"></div>
						</td>
					</tr>
				</table>
				<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
			</form>
		</div>
		<!--{else}-->
		<div class="c_form">
		<!--{if $mtag[grade]==-1}-->
			您现在被群主禁言，不能参与讨论。
		<!--{else}-->
			你还不是该群组正式成员，不能参与讨论。
			<!--{if $mtag[grade]==-9}-->
			<a href="cp.php?ac=mtag&op=join&tagid=$mtag[tagid]" id="_tag_join_$mtag[tagid]" onclick="ajaxmenu(event, this.id, 99999)">现在就加入</a>。
			<!--{/if}-->
		<!--{/if}-->
		</div>
		<!--{/if}-->
	</div>			
</div>

<script type="text/javascript">
	resizeImg('div_post','600');
</script>
					
<!--{template footer}-->